package com.wb.spring.boot.autoconfigure.listener;

import com.wb.spring.boot.autoconfigure.register.IRegister;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;

public class WbUnRegisterListener implements ApplicationListener<ContextClosedEvent> {

    @Autowired
    private IRegister register;
    @Override
    public void onApplicationEvent(ContextClosedEvent event) {
        register.unRegister();
    }
}
